package com.jiangyg.mall.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 类描述：角色用户关联信息
 *
 * @author jiangyg
 * @version 2.0
 * @date 2020-08-04
 */
@Data
@NoArgsConstructor
@TableName("t_sys_role_user")
@EqualsAndHashCode(callSuper = true)
public class RoleUser extends BaseEntity {

    private static final long serialVersionUID = -7421934483602000239L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 角色ID
     */
    @TableField("role_id")
    private Long roleId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    public RoleUser(Long roleId, Long userId) {
        this.roleId = roleId;
        this.userId = userId;
    }

}
